/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ThreadClient;

import StaticClass.ArrSocket;
import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Oho
 */
public class ConnectFile extends Thread {
       
    int port;

    public ConnectFile(int port) {
        this.port = port;
        
    }
    public void run()
        {
        try {
           Socket sk = new Socket(ArrSocket.HOSTNAME, port);
                    new ThreadFile (sk).start();              
        } catch (UnknownHostException ex) {
            Logger.getLogger(ConnectFile.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(ConnectFile.class.getName()).log(Level.SEVERE, null, ex);
        }
            
        }
}
